{literal}
<style>
		/* sidebar */
		#select-category ul#select-category-list{
			list-style:none;
			margin: 10px 0px 10px 0px;
			padding:0px;	
			width: 100%;
			border-bottom: 1px solid #888;	
			border-right: 1px solid #888;
		 }
		#select-category ul#select-category-list ul{
			list-style:none;
			margin-bottom: 10px;
			border-bottom: 1px solid #888;
		 }
		#select-category ul#select-category-list li{
			margin-bottom: 0px;
			border-left: 1px solid #888;
			border-top: 1px solid #888;
			border-left: 1px solid #888;
			background: #fff;
		 }
		 
		
		#select-category ul#select-category-list li li {
			margin-bottom: 0px; 
			margin-left: 20px;
			border-left: 1px solid #888;
			border-top: 1px solid #888;
			border-left: 1px solid #888;
			border-right: none;
			border-bottom: none;
		 }
		 
		 #select-category ul#select-category-list li.clossed { background: url(../public/skins/icons/expand.gif) 10px 6px no-repeat;}
		 #select-category ul#select-category-list li.clossed ul{ display: none; }		 
		 #select-category ul#select-category-list li li.clossed ul { display: none; }
		 
		 #select-category ul#select-category-list li.opened { background: url(../public/skins/icons/collapse.gif) 10px 6px no-repeat;}
		 
		 
		 #select-category ul#select-category-list li.current-li { background: #ddd;}		 
		 #select-category ul#select-category-list li li.current-li { background: #ddd; }

		#select-category ul#select-category-list div{
			display:block;
			font-weight:bold;
			color: #666;	
			text-decoration:none;	
			padding:2px 5px 2px 25px;
			background: none;
			border: none;	
			min-height:18px;
			cursor: pointer;
		 }
		
		#select-category ul#select-category-list div.selected {
			background: #ddd;
		 }
		 
		* html body #select-category ul#select-category-list div { 
			padding:2px 5px 2px 25px;
			text-decoration: underline;
			height: 18px; 
		}
		
		 #select-category ul#select-category-list li.clossed:hover{
			background: #ddd url(../public/skins/icons/expand.gif) 10px 6px no-repeat;
		 }
		 #select-category ul#select-category-list li.opened:hover{
			background: #fff url(../public/skins/icons/collapse.gif) 10px 6px no-repeat;
		 }
		 
		 #select-category ul#select-category-list li.select_categ{
		 	background: #fff;
		 }
		 
		 #select-category ul#select-category-list div:hover{	
		 	
		 } 
</style>
{/literal}
			{literal}
			<script type="text/javascript">
			
				
				function wyczysc_formularz(){
					$('#tresc_wiadomosci__').html('Treść wiadomości...'); 
				}
				
				function opisDodawanychPlików(){
					// obsługa pol
					$(".lista-plikow-oferty-nazwa").click(function(){ if ( $(this).attr("value") == 'Enter a description of the file...' ) $(this).attr("value",""); });
					$(".lista-plikow-oferty-nazwa").change(function(){ if ( $(this).attr("value") == '' ) $(this).attr("value","Enter a description of the file..."); });
				}	
			
				function usunWybranaLokalizacje(id){
					$("#Loc"+id+"Selected").remove();
				}
				
			
			
				function setChangeForAllWeek(id,From,value_){
					switch(From){
						case "openXxxFrom":
							$("#openWtoFrom"+id).attr("value",value_);
							$("#openSroFrom"+id).attr("value",value_);
							$("#openCzwFrom"+id).attr("value",value_);
							$("#openPioFrom"+id).attr("value",value_);
							$("#openSobFrom"+id).attr("value",value_);
							$("#openNieFrom"+id).attr("value",value_);
						break;
						case "openXxxTo":
							$("#openWtoTo"+id).attr("value",value_);
							$("#openSroTo"+id).attr("value",value_);
							$("#openCzwTo"+id).attr("value",value_);
							$("#openPioTo"+id).attr("value",value_);
							$("#openSobTo"+id).attr("value",value_);
							$("#openNieTo"+id).attr("value",value_);
						break;
						case "deliXxxFrom":
							$("#deliWtoFrom"+id).attr("value",value_);
							$("#deliSroFrom"+id).attr("value",value_);
							$("#deliCzwFrom"+id).attr("value",value_);
							$("#deliPioFrom"+id).attr("value",value_);
							$("#deliSobFrom"+id).attr("value",value_);
							$("#deliNieFrom"+id).attr("value",value_);
						break;
						case "deliXxxTo":
							$("#deliWtoTo"+id).attr("value",value_);
							$("#deliSroTo"+id).attr("value",value_);
							$("#deliCzwTo"+id).attr("value",value_);
							$("#deliPioTo"+id).attr("value",value_);
							$("#deliSobTo"+id).attr("value",value_);
							$("#deliNieTo"+id).attr("value",value_);
						break;					
					}
				}
			
			
						//var fileInp = "<input type=\"file\" id=\"pliki"+id+"_"+n+"\" name=\"pliki["+id+"][]\" class=\"lista-plikow-oferty\" title=\""+n+"\" onchaneg=\"onChangeInputFile("+id+")\"/>";
				function onChangeInputFile(id,i){
					//$("#pliki"+id+"_"+i).change( function() {
						n = $(".lista-plikow-oferty").length;
						n++;
						
						ext = ($("#pliki"+id+"_"+i).val());
						ext = ext.substring(ext.length-4,ext.length);
						ext = ext.toLowerCase();
						if(ext == 'jpeg' || ext == '.jpg') {
								$("#pliki"+id+"_"+i).attr("title",n);
								$("#pliki"+id+"_"+i).attr("id","pliki"+id+"_"+n);
								
								$x = $("#div"+id+"_"+i).clone();
								
								$("#pliki"+id+"_"+n).attr("title",i);
								$("#pliki"+id+"_"+n).attr("id","pliki"+id+"_"+i);
			
								
								$x.attr("id","div"+id+"_"+n);
								if (n<=20) $x.insertBefore($("#div"+id+"_"+i));
								$x.html("<input type=\"file\" id=\"pliki"+id+"_"+n+"\" name=\"pliki["+id+"][]\" class=\"lista-plikow-oferty\" title=\""+n+"\" onchange=\"onChangeInputFile("+id+","+n+")\"/><input type=\"text\" name=\"pliki_nazwa["+id+"][]\" value=\"\" class=\"lista-plikow-oferty-nazwa\"/>");
					  }else{
						  $("#div"+id+"_"+i).html($("#div"+id+"_"+i).html());
						  alert("Please select JPG file");
					  }					
				}	

				function onChangeInputFoto(id,i){
					//$("#pliki"+id+"_"+i).change( function() {
						m = $(".lista-zdjec-oferty").length;
						m++;
						
						ext = ($("#zdjecia"+id+"_"+i).val());
						ext = ext.substring(ext.length-4,ext.length);
						ext = ext.toLowerCase();
						if(ext == 'jpeg' || ext == '.jpg') {
								$("#zdjecia"+id+"_"+i).attr("title",m);
								$("#zdjecia"+id+"_"+i).attr("id","zdjecia"+id+"_"+m);
								
								$x = $("#divFoto"+id+"_"+i).clone();
								
								$("#zdjecia"+id+"_"+m).attr("title",i);
								$("#zdjedia"+id+"_"+m).attr("id","zdjecia"+id+"_"+i);
			
								
								$x.attr("id","divFoto"+id+"_"+m);
								if (m<=5) $x.insertBefore($("#divFoto"+id+"_"+i));
								$x.html("<input type=\"file\" id=\"zdjecia"+id+"_"+m+"\" name=\"zdjecia["+id+"][]\" class=\"lista-zdjec-oferty\" title=\""+m+"\" onchange=\"onChangeInputFoto("+id+","+m+")\"/><input type=\"text\" name=\"zdjecia_nazwa["+id+"][]\" value=\"\" class=\"lista-zdjec-oferty-nazwa\"/>");
					  }else{
						  $("#divFoto"+id+"_"+i).html($("#divFoto"+id+"_"+i).html());
						  alert("Please select JPG file");
					  }					
				}
			
				
			
			
				function dodajWybranaLokalizacje(id){
					{/literal}
					var newProduct = "<table class=\"dodane-adresy-box-lista\" id=\"Loc"+id+"Selected\">";
					newProduct +=  "<tr><td colspan=\"2\"><input type=\"hidden\" name=\"tacIDs["+id+"]\" value=\"{$tacID}\"/>";
					newProduct +=  "<table class=\"dodatkowe-informacje-ikony\" ><tr><td><input type=\"checkbox\" onclick=\"this.value = (this.checked)?1:0\" value=\"1\" checked=\"checked\" name=\"tapMapa["+id+"]\"/></td>";
					newProduct +=  "<td> {$__cl.mapa}</td>";
					newProduct +=  "<td><input type=\"checkbox\" onclick=\"this.value = (this.checked)?1:0\"  value=\"1\" checked=\"checked\" name=\"tapMenu["+id+"]\"/></td>";
					newProduct +=  "<td> {$__cl.menu_online}</td>";
					newProduct +=  "<td><input type=\"checkbox\" onclick=\"this.value = (this.checked)?1:0\" value=\"1\" checked=\"checked\" name=\"tapDost["+id+"]\"/></td>";
					newProduct +=  "<td> {$__cl.dostawa}</td>";
					newProduct +=  "<td><input type=\"checkbox\" onclick=\"this.value = (this.checked)?1:0\" value=\"1\" checked=\"checked\" name=\"tapProm["+id+"]\"/></td>";
					newProduct +=  "<td> {$__cl.promocje}</td></tr></table>";
					newProduct +=  "<div class=\"usun-pozycje-z-listy\"><img src=\"{$smarty.request.HTTP_URL}public/skins/icons/16_delete.gif\" width=\"16\" height=\"16\"  title=\"Usuń pozycję\"  alt=\"mapa...\" border=\"0\" align=\"middle\" onclick=\"clickCategoryName("+id+");\" style=\"padding: 2px; cursor: pointer;\"></div>";
					newProduct +=  "</td></tr><tr><td colspan=\"2\">";
			
					newProduct +=  "<div class=\"langs-wpisy\"><ul>";
					//newProduct +=  "<li><a href=\"#tabs-00-"+id+"\"><img src=\"{$smarty.request.HTTP_URL}public/skins/icons/16_produkt_tabs.png\" width=\"16\" height=\"14\"  title=\"Mapa\"  alt=\"mapa...\" border=\"0\" align=\"middle\"></a></li>";
					newProduct +=  "<li><a href=\"#tabs-01-"+id+"\">{$__cl.adres}</a></li>";
					newProduct +=  "<li><a href=\"#tabs-02-"+id+"\">{$__cl.rodzaj_kuchni}</a></li>";
					newProduct +=  "<li><a href=\"#tabs-03-"+id+"\">{$__cl.godziny_otwarcia}</a></li>";
					newProduct +=  "<li><a href=\"#tabs-04-"+id+"\">{$__cl.czas_oczekiwania_na_zamowienie}</a></li>";
					newProduct +=  "<li><a href=\"#tabs-05-"+id+"\">{$__cl.dostawy}</a></li>";		
					newProduct +=  "<li><a href=\"#tabs-06-"+id+"\">{$__cl.galeria_plikow}</a></li>";
					newProduct +=  "<li><a href=\"#tabs-07-"+id+"\">{$__cl.promocje}</a></li>";
					newProduct +=  "<li><a href=\"#tabs-08-"+id+"\">{$__cl.galeria_zdjec}</a></li>";
					newProduct +=  "</ul>";
					//newProduct +=  "<div id=\"tabs-00-"+id+"\"></div>";
					
					newProduct +=  "<div class=\"tabs-main-body\" id=\"tabs-01-"+id+"\">";
					newProduct += "<table class=\"adres-nazwa-lokalu\">";
					newProduct += "<tr><td colspan=\"2\"><span id=\"selectedAdressArea"+id+"\">"+$("#selectedCat"+id).attr("title")+"</span><input type=\"hidden\" name=\"tapLokalizacja["+id+"]\" value=\""+$("#selectedCat"+id).attr("title").replace('"','')+"\"/></td></tr>";
					newProduct += "<tr><td>{$__cl.produkt_numer_telefonu}</td><td><input class=\"dane-kontaktowe-lokalu\" type=\"text\" id=\"tapDaneTelefon"+id+"\" name=\"tapDaneTelefon["+id+"]\" value=\"\" /></td></tr>";
					newProduct += "<tr><td>{$__cl.produkt_adres_email}</td><td><input class=\"dane-kontaktowe-lokalu\" type=\"text\" id=\"tapDaneEmail"+id+"\" name=\"tapDaneEmail["+id+"]\" value=\"\" /></td></tr>";
					newProduct += "<tr><td>{$__cl.adres_lokalizacja}</td><td><input class=\"wybrane-adresy-lokali\" type=\"text\" id=\"tapAdres"+id+"\" name=\"tapAdres["+id+"]\" value=\"\" /> <input class=\"szukaj-na-mapie-wg-adresu\" type=\"button\" onclick=\"sherhMap.showAddress("+id+"); return false\" value=\"{$__cl.wyszukaj_na_mapie}\"/> </td></tr></table>";
					
					
					newProduct +=  "<div id=\"map_"+id+"\" style=\"width: 660px; height: 230px; float: left;\"></div>";
					newProduct +=  "<input type=\"hidden\" name=\"lat["+id+"]\" id=\"lat"+id+"\" value=\"0.0\"/>";
					newProduct +=  "<input type=\"hidden\" name=\"lng["+id+"]\" id=\"lng"+id+"\" value=\"0.0\"/>";
					newProduct +=  "</div>";
			
					newProduct +=  "<div  class=\"tabs-main-body\" id=\"tabs-02-"+id+"\">";
					newProduct +=  "<div class=\"lista-typow-kuchni\"><div>{$__cl.prosze_zaznaczyc_wybrane_pozycje}</div>";
					{strip}newProduct +=  "<ul  id=\"kuchnia-lista"+id+"\">"+"{dispatcher->handleEvent v="KatalogTA,wyswietlListeSlownikaKuchniDlaNowegoProduktu" }"+"</ul>";{/strip}
					newProduct +=  "</div></div>";
							
					newProduct +=  "<div  class=\"tabs-main-body\" id=\"tabs-03-"+id+"\">";
					newProduct +=  "<table><tr><th>Day</th><th colspan=\"2\">Opening Hours</th><th></th><th colspan=\"2\">Delivery Hours</th></tr>";
					newProduct +=  "<tr><th>Monday:</th><td>from:<select  onchange=\"setChangeForAllWeek("+id+",'openXxxFrom',this.value);\" name=\"openPonFrom["+id+"]\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select onchange=\"setChangeForAllWeek("+id+",'openXxxTo',this.value);\" name=\"openPonTo["+id+"]\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select  onchange=\"setChangeForAllWeek("+id+",'deliXxxFrom',this.value);\" name=\"deliPonFrom["+id+"]\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select onchange=\"setChangeForAllWeek("+id+",'deliXxxTo',this.value);\"  name=\"deliPonTo["+id+"]\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "<tr><th>Tuesday:</th><td>from:<select name=\"openWtoFrom["+id+"]\" id=\"openWtoFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"openWtoTo["+id+"]\" id=\"openWtoTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select name=\"deliWtoFrom["+id+"]\" id=\"deliWtoFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"deliWtoTo["+id+"]\" id=\"deliWtoTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "<tr><th>Wednesday:</th><td>from:<select name=\"openSroFrom["+id+"]\" id=\"openSroFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"openSroTo["+id+"]\" id=\"openSroTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select name=\"deliSroFrom["+id+"]\" id=\"deliSroFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"deliSroTo["+id+"]\" id=\"deliSroTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "<tr><th>Thursday:</th><td>from:<select name=\"openCzwFrom["+id+"]\" id=\"openCzwFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"openCzwTo["+id+"]\" id=\"openCzwTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select name=\"deliCzwFrom["+id+"]\" id=\"deliCzwFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"deliCzwTo["+id+"]\" id=\"deliCzwTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "<tr><th>Friday:</th><td>from:<select name=\"openPioFrom["+id+"]\" id=\"openPioFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"openPioTo["+id+"]\" id=\"openPioTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select name=\"deliPioFrom["+id+"]\" id=\"deliPioFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"deliPioTo["+id+"]\" id=\"deliPioTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "<tr><th>Saturday:</th><td>from:<select name=\"openSobFrom["+id+"]\" id=\"openSobFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"openSobTo["+id+"]\" id=\"openSobTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select name=\"deliSobFrom["+id+"]\" id=\"deliSobFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"deliSobTo["+id+"]\" id=\"deliSobTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "<tr><th>Sunday:</th><td>from:<select name=\"openNieFrom["+id+"]\" id=\"openNieFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"openNieTo["+id+"]\" id=\"openNieTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td style=\"width:20px;\"> </td><td>from:<select name=\"deliNieFrom["+id+"]\" id=\"deliNieFrom"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td><td>to:<select name=\"deliNieTo["+id+"]\" id=\"deliNieTo"+id+"\"><option value=\"00:00\">00:00</option><option value=\"01:00\">01:00</option><option value=\"02:00\">02:00</option><option value=\"03:00\">03:00</option><option value=\"04:00\">04:00</option><option value=\"05:00\">05:00</option><option value=\"06:00\">06:00</option><option value=\"07:00\">07:00</option><option value=\"08:00\">08:00</option><option value=\"09:00\">09:00</option><option value=\"10:00\">10:00</option><option value=\"11:00\">11:00</option><option value=\"12:00\">12:00</option><option value=\"13:00\">13:00</option><option value=\"14:00\">14:00</option><option value=\"15:00\">15:00</option><option value=\"16:00\">16:00</option><option value=\"17:00\">17:00</option><option value=\"18:00\">18:00</option><option value=\"19:00\">19:00</option><option value=\"20:00\">20:00</option><option value=\"21:00\">21:00</option><option value=\"22:00\">22:00</option><option value=\"23:00\">23:00</option><option value=\"24:00\">24:00</option></select></td></tr>";
					newProduct +=  "</table></div>";
			
					newProduct +=  "<div class=\"tabs-main-body\" id=\"tabs-04-"+id+"\">";
					newProduct +=  "<div class=\"collection-lista\"><textarea  name=\"collection["+id+"]\" class=\"mhtmledytor"+id+"\" ></textarea></div>";
					newProduct +=  "</div>";
			
					newProduct +=  "<div class=\"tabs-main-body\" id=\"tabs-05-"+id+"\">";
					newProduct +=  "<div class=\"dellivery-lista\"><textarea  name=\"dellivery["+id+"]\" class=\"mhtmledytor"+id+"\" ></textarea></div>";
					newProduct +=  "</div>";
			
					newProduct +=  "<div class=\"tabs-main-body\" id=\"tabs-06-"+id+"\">";
					newProduct +=  "<table width=\"680px\"><tr><th>Menu file path/Name:</th><td><div id=\"div"+id+"_0\"><input name=\"pliki["+id+"][]\" id=\"pliki"+id+"_0\" type=\"file\" class=\"lista-plikow-oferty\" onchange=\"onChangeInputFile("+id+",this.title);\" title=\"0\"/><input type=\"text\" name=\"pliki_nazwa["+id+"][]\" value=\"\" title=\"Enter a description of the file...\" class=\"lista-plikow-oferty-nazwa\"/><br/>Maximum file size 1MB</div></td></tr></table>";		
					newProduct +=  "</div>";
			
			
					newProduct +=  "<div class=\"tabs-main-body\" id=\"tabs-07-"+id+"\">";
					newProduct +=  "<div class=\"promocje-lista\"><textarea  name=\"promocje["+id+"]\" class=\"mhtmledytor"+id+"\" ></textarea></div>";
					newProduct +=  "</div>";

					newProduct +=  "<div class=\"tabs-main-body\" id=\"tabs-08-"+id+"\">";
					newProduct +=  "<table width=\"680px\"><tr><th>Photos path/Name:</th><td><div id=\"divFoto"+id+"_0\"><input name=\"zdjecia["+id+"][]\" id=\"zdjecia"+id+"_0\" type=\"file\" class=\"lista-zdjec-oferty\" onchange=\"onChangeInputFoto("+id+",this.title);\" title=\"0\"/><input type=\"text\" name=\"zdjecia_nazwa["+id+"][]\" value=\"\" title=\"Enter a description of the file...\" class=\"lista-zdjec-oferty-nazwa\"/><br/>Maximum file size 1MB</div></td></tr></table>";		
					newProduct +=  "</div>";
										
					newProduct +=  "</div>";
			
					
				
					newProduct +=  "</td></tr></table>";
					$("#wybraneLokalizacje").append(newProduct);
					{literal}
				}
			
			
				var sherhMap = {
					init: function(tapMapID){
						if (GBrowserIsCompatible()) {
							sherhMap.obiekt = tapMapID;
							sherhMap.map[sherhMap.obiekt] = new GMap2(document.getElementById("map_"+sherhMap.obiekt));
							sherhMap.map[sherhMap.obiekt].addControl(new GSmallMapControl());
							sherhMap.map[sherhMap.obiekt].addControl(new GMapTypeControl());
							this.setcenter();
							this.geocoder = new GClientGeocoder();
							this.marker = new GMarker(this.center, {draggable: true});
							sherhMap.map[sherhMap.obiekt].addOverlay(sherhMap.marker);
							this.resultCoord(this.center.lat(),this.center.lng());
							sherhMap.addListnerMarker();
							sherhMap.addListnerMap();			
						}
					},
					mapID: false,
					obiekt: false,
					map: {},
					lat: 49.81683160533214,
					lng: 22.815685272216797,
					zoom: 11,
					center: false,
					setcenter: function(){
						this.center = new GLatLng(this.lat,this.lng);
						this.map[sherhMap.obiekt].setCenter(this.center, this.zoom);
					},
					geocoder: false,
					marker: false,
					point: false,
					addListnerMarker: function(){
						GEvent.addListener(sherhMap.marker, "dragend", function() {
							sherhMap.point = sherhMap.marker.getPoint();
							sherhMap.map[sherhMap.obiekt].panTo(sherhMap.point);
							sherhMap.resultCoord(sherhMap.point.lat(),sherhMap.point.lng());
						});	
					},
					addListnerMap: function(){
						GEvent.addListener(sherhMap.map[sherhMap.obiekt], "moveend", function() {
							sherhMap.map[sherhMap.obiekt].clearOverlays();
							sherhMap.center = sherhMap.map[sherhMap.obiekt].getCenter();
							sherhMap.marker = new GMarker(sherhMap.center, {draggable: true});
							sherhMap.map[sherhMap.obiekt].addOverlay(sherhMap.marker);
							sherhMap.resultCoord(sherhMap.center.lat(),sherhMap.center.lng());
			
							GEvent.addListener(sherhMap.marker, "dragend", function() {
								sherhMap.point = sherhMap.marker.getPoint();
								sherhMap.map[sherhMap.obiekt].panTo(sherhMap.point);
								sherhMap.resultCoord(sherhMap.point.lat(),sherhMap.point.lng());
							});
						});	
					},
					resultCoord: function(lat,lng){
						//$("lat"+sherhMap.obiekt).attr("value",lat);
						//$("lng"+sherhMap.obiekt).attr("value",lng);
						document.getElementById("lat"+this.obiekt).value = lat;
						document.getElementById("lng"+this.obiekt).value = lng;
					},
					showAddress: function (id) {
						address = $("#selectedAdressArea"+id).text() + $("#tapAdres"+id).val();
						if (sherhMap.geocoder) {
							
							sherhMap.geocoder.getLatLng(address,	function( point ) {
								if (!point) {
									alert(address + " not found");
								} else {
									sherhMap.resultCoord(point.lat(),point.lng());
									sherhMap.map[id].clearOverlays()
									sherhMap.map[id].setCenter(point, sherhMap.zoom);
									sherhMap.marker = new GMarker(point, {draggable: true});  
									sherhMap.map[id].addOverlay(sherhMap.marker);
					
									GEvent.addListener(sherhMap.marker, "dragend", function() {
										var pt = sherhMap.marker.getPoint();
										sherhMap.map[id].panTo(pt);
										document.getElementById("lat"+sherhMap.obiekt).value = pt.lat();
										document.getElementById("lng"+sherhMap.obiekt).value = pt.lng();
										//$("lat"+sherhMap.id).attr("value",pt.lat());
										//$("lng"+sherhMap.id).attr("value", pt.lng());
										sherhMap.resultCoord(pt.lat(),pt.lng());
									});
									GEvent.addListener(sherhMap.map[id], "moveend", function() {
										sherhMap.map[id].clearOverlays();
										sherhMap.center = sherhMap.map[id].getCenter();
										sherhMap.marker = new GMarker(sherhMap.center, {draggable: true});
										sherhMap.map[id].addOverlay(sherhMap.marker);
										sherhMap.resultCoord(sherhMap.center.lat(),sherhMap.center.lng());
					
										GEvent.addListener(sherhMap.marker, "dragend", function() {
											var pt = sherhMap.marker.getPoint();
											sherhMap.map[id].panTo(pt);
											//$("lat"+sherhMap.obiekt).attr("value",pt.lat());
											//$("lng"+sherhMap.obiekt).attr("value", pt.lng());
											document.getElementById("lat"+sherhMap.obiekt).value = pt.lat();
											document.getElementById("lng"+sherhMap.obiekt).value = pt.lng();
											sherhMap.resultCoord(pt.lat(),pt.lng());
										});
									});
								}
							});
						}
					}
				}
				
			
				function clickCategoryName(id){
					if($("#selectedCat"+id).is(":checked")){
						 $("#selectedCat"+id).attr("checked",false);
						 $("#selectedCat"+id).attr("value",null);	
						 usunWybranaLokalizacje(id);
						 	 
					}
					else{
						 $("#selectedCat"+id).attr("checked",true);
						 $("#selectedCat"+id).attr("value",id);
						 dodajWybranaLokalizacje(id);
						 $(".langs-wpisy").tabs({ collapsible: true },1); // uruchomienie zakładek			 
						 sherhMap.init(id); // uruchomienie mapy	
						 sherhMap.showAddress(id);		 
						 mWysArr = $('.mhtmledytor'+id).rte(); // uruchomienie wyswyg edytora
						 opisDodawanychPlików(); 
					}
				}
			
				function clickCheckbox(id){
					if($("#selectedCat"+id).is(":checked")){
						 $("#selectedCat"+id).attr("value",id);
						 dodajWybranaLokalizacje(id);
						 $(".langs-wpisy").tabs({ collapsible: true },1);
						 //sherhMap.init(id);
						 sherhMap.init(id); // uruchomienie mapy
						 sherhMap.showAddress(id);	
						 mWysArr = $('.mhtmledytor'+id).rte(); // uruchomienie wyswyg edytora
						 opisDodawanychPlików();
					}
					else{
						 $("#selectedCat"+id).attr("value",null);			 
						 usunWybranaLokalizacje(id);
						 //GUnload();
					}
				}

				//zamyka rozwija strukture kategorii 
				// wywoanie z obiektu: ul -> li -> div
				// obsuga obiektu: ul -> li
				function open_close_list_category(liID){
					stan = $('#'+liID).attr("class");
					if(stan == 'clossed'){
						$("#"+liID+" > ul").css("display", "block");
						$("#"+liID+" > ul").attr("class", "clossed");
						$('#'+liID).attr("class", "opened");
					}else{
						$("#"+liID+" > ul").attr("class", "clossed");
						$("#"+liID+" > ul").css("display", "none");
						$('#'+liID).attr("class", "clossed");	
					}
						
				}
				
			</script>

			{/literal}
			
			<h2>Select category</h2>
			<input type="checkbox" checked="checked" readonly="readonly" /> {$__cl.opis_dodawania_produktu}
			{dispatcher->handleEvent v=KatalogTA,wyswietlKategorieKatalogu}
			
			
			<h2>{$__cl.dodaj_nowy_produkt}</h2>
			
			<form action="{$smarty.const.HTTP_URL}{$settings_katalog_ta.mainpage|default:$page},KatalogTA,zapiszNowyProduktSklepu.html" enctype="multipart/form-data" method="post">
			
			
			<table class="nowy_produkt_form" id="plikiJpg" style="width: 95%;">
				<!-- nie można dodawac tr -->
				<tr>
					<th>
						{$__cl.dodaj_plik_logo}
					</th>
					<td>
						<input name="tapFile" type="file" style="width: 95%;"/>
					</td>
				</tr>
				<tr>
					<th>{$__cl.pelna_nazwa}</th><td><input class="nazwa-dodawanego-lokalu" type="text"  name="tapNazwa" value=""/></td>
				</tr>	
			</table>
			
			<table class="nowy_produkt_form" >
			
				<tr>
					<td id="wybraneLokalizacje" colspan="2">			
						
					</td>
				</tr>
				<tr>
					<th colspan="2">
						<input type="submit" value="{$__cl.zapisz_nowa_pozycje}"/> <input type="button" value="{$__cl.przerwij_wprowadzanie}" onclick="document.location='{$smarty.const.HTTP_URL}{$page},,show_category,{$tacID}.html';"/>
					</th>
				</tr>
			</table>
			
			
			</form>


